<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<title>najaxjs Namespace: history</title>

	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.yeti.css">

</head>

<body>

<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
	<div class="navbar-header">
		<a class="navbar-brand" href="index.html">najaxjs</a>
		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
        </button>
	</div>
	<div class="navbar-collapse collapse" id="topNavigation">
		<ul class="nav navbar-nav">
			
			<li class="dropdown">
				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="$najax.html">$najax</a></li><li><a href="$najax.define.html">$najax.define</a></li><li><a href="$najax.history.html">$najax.history</a></li><li><a href="$najax@class.html">$najax@class</a></li><li><a href="$najax@ex.html">$najax@ex</a></li><li><a href="$najax@helper.html">$najax@helper</a></li><li><a href="$najax@read.html">$najax@read</a></li><li><a href="$najax@rlk.html">$najax@rlk</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Linker.html">Linker</a></li><li><a href="Nx.html">Nx</a></li><li><a href="Pager.html">Pager</a></li><li><a href="Reflector.html">Reflector</a></li><li><a href="Relay.html">Relay</a></li><li><a href="RESTful.html">RESTful</a></li><li><a href="Singular.html">Singular</a></li><li><a href="Tx.html">Tx</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="tutorials.list.html" class="dropdown-toggle" data-toggle="dropdown">Tutorials<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="tutorial-demo-ui-ajax.html">demo-ui-ajax</a></li><li><a href="tutorial-najax-class.html">najax-class</a></li><li><a href="tutorial-najax-ex.html">najax-ex</a></li><li><a href="tutorial-najax-helper.html">najax-helper</a></li><li><a href="tutorial-najax-read.html">najax-read</a></li><li><a href="tutorial-relaylinker.html">relaylinker</a></li><li><a href="tutorial-rlk-standalone.html">rlk-standalone</a></li><li><a href="tutorial-static-history.html">static-history</a></li><li><a href="tutorial-static-najax-micro.html">static-najax-micro</a></li><li><a href="tutorial-static-najax.html">static-najax</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="global.html">Global</a></li>
				</ul>
			</li>
			
		</ul>
		<div class="col-sm-3 col-md-3">
            <form class="navbar-form" role="search">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
                    <div class="input-group-btn">
                        <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
                    </div>
                </div>
            </form>
        </div>
	</div>

</div>
</div>


<div class="container" id="toc-content">
<div class="row">

	
	<div class="col-md-8">
	
		<div id="main">
			

	<h1 class="page-title">Namespace: history</h1>
<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="$najax.html">$najax</a>.</span>
        
        history
        </h2>
        
    
</header>


<article>
    <div class="container-overview">
    
        
            <div class="description"><p>Support history push and replace, listen.</p>
<p><b><i>Note! Not included in najax-tiny.js.</i></b><br></p>
<table>
<thead>
<tr>
<th style="text-align:left">Method</th>
<th style="text-align:center">Default ver</th>
<th style="text-align:center">Tiny ver</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">All methods</td>
<td style="text-align:center">Yes</td>
<td style="text-align:center">-</td>
</tr>
</tbody>
</table></div>
        

        
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-3">line 3</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	

	
</dl>


        
            <h3>Example</h3>
            
    <pre class="sunlight-highlight-javascript">//push
$najax.history.push(&#x27;?v=1&#x27;);
$najax.history.push(&#x27;?v=1&#x27;, null, &#x27;abc&#x27;);
$najax.history.pushQuery();

//replace
$najax.history.replace(&#x27;?v=1&#x27;);
$najax.history.replace(&#x27;?v=1&#x27;, null, &#x27;abc&#x27;, {data: {v: 2}});
$najax.history.replaceQuery(&#x27;abc&#x27;, {v: 2});

//listen
$najax.history.listen(function(e, id, vs, title){ ... });

//init
$najax.history.replaceListen(function(e, id, vs, title){ ... });</pre>


        
    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<hr>
<dt>
    <h4 class="name" id=".init"><span class="type-signature">&lt;static> </span>init(fn, <span class="optional">id</span>, <span class="optional">title</span>, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Replace &amp; replace now.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Callback function. <code>function(e:event, title:string, vs:assoc){ ... }</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Page's id.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Title.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Options. <i>$najax.history.listen, $najax.history.replace</i>'s options.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Passed values.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-216">line 216</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.replaceListen(function(e, id, title, data){ ... }, id);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".listen"><span class="type-signature">&lt;static> </span>listen(fn, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Listen to event of browser's back and prev.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Callback function. <code>function(e:event, title:string, vs:assoc){ ... }</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Options.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>Change title automatically.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-176">line 176</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.listen(function(e, id, title, data){ ... });</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".push"><span class="type-signature">&lt;static> </span>push(url, <span class="optional">id</span>, <span class="optional">title</span>, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Push new page's url and title, values. Recommend to use this method with <i>$najax.history.listen</i>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>URL.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Page's id.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Title.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Options.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Passed values.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>store</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>Store first page's data by <i>$najax.history.replace</i>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>legacy</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Legacy browser's behaviors. <code>Ex: function(url, title, vs){location.href = url;}</code></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-42">line 42</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="$najax.history.html#.pushQuery">$najax.history.pushQuery</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.push(&#x27;?v=1&#x27;);
$najax.history.push(&#x27;?v=1&#x27;, id, &#x27;abc&#x27;, {data: {v: 2}});
$najax.history.push(&#x27;?v=1&#x27;, null, null, {legacy: function(url, id, title, vs){ ... } });</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".pushQuery"><span class="type-signature">&lt;static> </span>pushQuery(<span class="optional">id</span>, <span class="optional">title</span>, <span class="optional">vs</span>, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Push new page's url and title, values. Support query-string. Recommend to use this with <i>$najax.history.listen</i>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Page's id.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Title. If null, set now title.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vs</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Passed values. URL's query-string values is overrided by this values.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Options. $najax.history.push options.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-83">line 83</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="$najax.history.html#.pushQuery">$najax.history.pushQuery</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.pushQuery();
$najax.history.pushQuery(id, &#x27;abc&#x27;, vs, {data: {v: 2}});
$najax.history.pushQuery(null, &#x27;abc&#x27;, null, {title: false});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".replace"><span class="type-signature">&lt;static> </span>replace(<span class="optional">url</span>, <span class="optional">id</span>, <span class="optional">title</span>, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Replace now page's url and title, values.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>URL. If null, prepare now url.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Page's id.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Title. If null, set now title.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Options.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Passed values.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>legacy</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Legacy browser's behaviors. <code>Ex: function(url, title, vs){location.replace = url;}</code></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-108">line 108</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="$najax.history.html#.replaceQuery">$najax.history.replaceQuery</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.replace(&#x27;?v=1&#x27;);
$najax.history.replace(&#x27;?v=1&#x27;, id, &#x27;abc&#x27;, {data: {v: 2}});
$najax.history.replace(&#x27;?v=1&#x27;, null, null, {legacy: function(url, id, title, vs){ ... } });</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".replaceQuery"><span class="type-signature">&lt;static> </span>replaceQuery(<span class="optional">id</span>, <span class="optional">title</span>, <span class="optional">vs</span>, <span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Replace now page's url and title, values. Support query-string.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Page's id.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Title. If null, set now title.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vs</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Passed values. URL's query-string values is overrided by this values.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Options. $najax.history.replace options.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-151">line 151</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="$najax.history.html#.replace">$najax.history.replace</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.history.replaceQuery();
$najax.history.replaceQuery(id, &#x27;abc&#x27;, vs, {data: {v: 2}});
$najax.history.replaceQuery(null, &#x27;abc&#x27;, null, {title: false});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id=".state"><span class="type-signature">&lt;static> </span>state()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Get <i>history.state</i>.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="default_history.static.js.html">default/history.static.js</a>,
				 <a href="default_history.static.js.html#sunlight-1-line-240">line 240</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-history.html">static-history</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">vs = $najax.history.state();</pre>


    
</dd>

        </dl>
    

    

    
</article>

</section>




		</div>
	</div>

	<div class="clearfix"></div>

	
		<div class="col-md-3">
			<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
		</div>
	

</div>
</div>

<div class="modal fade" id="searchResults">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Search results</h4>
      </div>
      <div class="modal-body"></div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>

<footer>

	&nbsp;


<span class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a>
	
	using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>

<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>

<script>
$( function () {
	$( "[id*='$']" ).each( function () {
		var $this = $( this );

		$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
	} );

	$( ".tutorial-section pre, .readme-section pre" ).each( function () {
		var $this = $( this );

		var example = $this.find( "code" );
		exampleText = example.html();
		var lang = /{@lang (.*?)}/.exec( exampleText );
		if ( lang && lang[1] ) {
			exampleText = exampleText.replace( lang[0], "" );
			example.html( exampleText );
			lang = lang[1];
		} else {
			var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
			lang = langClassMatch ? langClassMatch[1] : "javascript";
		}

		if ( lang ) {

			$this
			.addClass( "sunlight-highlight-" + lang )
			.addClass( "linenums" )
			.html( example.html() );

		}
	} );

	Sunlight.highlightAll( {
		lineNumbers : true,
		showMenu : true,
		enableDoclinks : true
	} );

	$.catchAnchorLinks( {
        navbarOffset: 10
	} );
	$( "#toc" ).toc( {
		anchorName  : function ( i, heading, prefix ) {
			var id = $( heading ).attr( "id" );
			return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
		},
		selectors   : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
		showAndHide : false,
		smoothScrolling: true
	} );

	$( "#main span[id^='toc']" ).addClass( "toc-shim" );
	$( '.dropdown-toggle' ).dropdown();

    $( "table" ).each( function () {
      var $this = $( this );
      $this.addClass('table');
    } );

} );
</script>



<!--Navigation and Symbol Display-->


<!--Google Analytics-->


<script type="text/javascript">
	$(document).ready(function() {
		SearcherDisplay.init();
	});
</script>

</body>
</html>